/**
 * @description 吐司提示
 * @param { string } title 标题
 * @param { string } icon icon
 * @param { number } during 时长
 */
export function uToast(title: string = '', icon: UniApp.ShowToastOptions['icon'] = 'none', during: number = 2000) {
    const opt = {
      title,
      icon,
      during
    } as UniApp.ShowToastOptions
    uni.showToast(opt)
  }
  
  /**
   * @description 加载中
   * @param { string } title 标题
   * @param { boolean } mask 是否显示遮罩层
   */
  export function uLoading(title: string = '加载中', mask: boolean = true) {
    const opt = {
      title,
      mask
    } as UniApp.ShowLoadingOptions
    uni.showLoading(opt)
  }
  
  /**
   * @description loading加载自动关闭
   */
  export function uAutoCloseLoading (time = 1000) {
    // 设备在线加载loadinfg
    uLoading()
    setTimeout(() => {
      uni.hideLoading()
    }, time)
  }
  